
package com.fire.eyes.service.impl;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.fire.eyes.dao.NoticeMapper;
import com.fire.eyes.model.NoticeModel;
import com.fire.eyes.model.UserLoginModel;
import com.fire.eyes.service.INoticeService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;

import java.util.List;
import java.util.Map;

/**
 * 通知Service
 *
 * @author Matthew
 * @Date 2019-01-21 19:46
 */
@Service
public class NoticeServiceImpl extends ServiceImpl<NoticeMapper , NoticeModel> implements INoticeService{

    private static final Logger LOGGER = LoggerFactory.getLogger(NoticeServiceImpl.class);

    @Autowired
    private NoticeMapper noticeMapper;

    @Override
    public NoticeModel selectOne(NoticeModel entity){
        return noticeMapper.selectOne(entity);
    }

    @Override
    public List<NoticeModel>selectList(NoticeModel model){
        return noticeMapper.selectListByModel(model);
    }

    @Override
    public Page<NoticeModel> selectPage(int currentPage, int pageSize, Wrapper<NoticeModel> wrapper){
        return selectPage(new Page<NoticeModel>(currentPage,pageSize), wrapper);
    }

    @Override
    public Page<Map<String, Object>> selectMapsPage(int currentPage, int pageSize, Wrapper<NoticeModel> wrapper){
        return selectMapsPage(new Page<NoticeModel>(currentPage,pageSize), wrapper);
    }

    @Override
    public List<NoticeModel> queryAllNotice(UserLoginModel model) {
        return noticeMapper.queryAllNotice(model);
    }

    @Override
    public List<NoticeModel> queryFirstLoginNotice(UserLoginModel userLoginModel) {
        return noticeMapper.queryFirstLoginNotice(userLoginModel);
    }

}
